package com.prototype.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;
import com.prototype.client.managed.request.OrderERPProxy;

public class OrderERPProxyRenderer extends ProxyRenderer<OrderERPProxy> {

    private static com.prototype.client.managed.ui.OrderERPProxyRenderer INSTANCE;

    protected OrderERPProxyRenderer() {
        super(new String[] { "orderName" });
    }

    public static com.prototype.client.managed.ui.OrderERPProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new OrderERPProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(OrderERPProxy object) {
        if (object == null) {
            return "";
        }
        return object.getOrderName() + " (" + object.getId() + ")";
    }
}
